﻿using System; 
using System.Collections.Generic;
using System.Text;

namespace AJAXChatClient.Flash.Net
{
    public class URLRequest
    {
        public URLRequest() : this(null) { }

        /// <summary>
        /// Creates a URLRequest object.
        /// </summary>
        /// <param name="url"></param>
        public URLRequest(string url)
        {
        }

        /// <summary>
        /// Allows substitution of a redirected URL from a source URLRequest for some portion of the URL in a new URLRequest.
        /// </summary>
        /// <param name="sourceRequest"></param>
        /// <param name="wholeURL"></param>
        /// <param name="pattern"></param>
        /// <param name="replace"></param>
        public void useRedirectedURL(URLRequest sourceRequest, bool wholeURL, object pattern, string replace)
        {
        }

        /// <summary>
        /// Specifies whether authentification requests should be handled (true) or not (false) for this request.
        /// </summary>
        public bool Authenticate
        {
            get;
            set;
        }

        /// <summary>
        /// Specifies whether successful response data should be cached for this request.
        /// </summary>
        public bool CacheResponse
        {
            get;
            set;
        }

        /// <summary>
        /// The MIME content type of the content in the <see cref="Data"/> property.
        /// </summary>
        public string ContentType
        {
            get;
            set;
        }

        /// <summary>
        /// An object containing data to be transmitted with the URL request.
        /// </summary>
        public object Data
        {
            get;
            set;
        }

        /// <summary>
        /// A string the uniquely identifies the signed Adobe platform component 
        /// to be stored to (or retrieved from) the Flash Player cache.
        /// </summary>
        public string Digest
        {
            get;
            set;
        }

        /// <summary>
        /// Specifies whether redirects are to be followed (true) or not (false).
        /// </summary>
        public bool FollowRedirects
        {
            get;
            set;
        }

        /// <summary>
        /// Specifies the idle timeout value (in milliseconds for this request.
        /// </summary>
        public int IdleTimeout
        {
            get;
            set;
        }

        /// <summary>
        /// Specifies whether the HTTP protocol stack should manage cookies for this request.
        /// </summary>
        public bool ManageCookies
        {
            get;
            set;
        }

        /// <summary>
        /// Controls the HTTP form submission method.
        /// </summary>
        public string Method
        {
            get;
            set;
        }

        /// <summary>
        /// The array of HTTP request headers to be appended to the HTTP request.
        /// </summary>
        public Array RequestHeaders
        {
            get;
            set;
        }

        /// <summary>
        /// The URL to be requested.
        /// </summary>
        public string URL
        {
            get;
            set;
        }

        /// <summary>
        /// Specifies whether the local cache should be consulted before this URLRequest fetches data.
        /// </summary>
        public bool UseCache
        {
            get;
            set;
        }

        /// <summary>
        /// Specifies the user-agent string to be used in the HTTP request.
        /// </summary>
        public string UserAgent
        {
            get;
            set;
        }
    }
}
